import { Component, Prop, Vue } from 'vue-property-decorator'

export interface path {
  path:string
  pName:string
}
export type paths = Array<path>

@Component
export default class Nav extends Vue {
  @Prop()
  paths?:paths

  render () {
    return (
      <el-breadcrumb separator="/">
        {this.paths?.map((item, index) => (
          <el-breadcrumb-item key={index} to={{ path: item.path }}>{item.pName}</el-breadcrumb-item>
        ))}
      </el-breadcrumb>
    )
  }
}
